package LeetCode;

public class Code136_singleNumber {

    public static int singleNumber(int[] nums) {
        int res = 0;
        for (int i = 0; i < nums.length; i++) {
            res ^= nums[i];
        }
        return res;
    }

    public static void main(String[] args) {
        int[] nums = new int[]{1,1,2,3,3};
        System.out.println(singleNumber(nums));
    }
}
